﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Exentials.Xoox.Styles
{
    public class XBorder : XElementBase
    {
        private XBorderPr _left;
        private XBorderPr _right;
        private XBorderPr _top;
        private XBorderPr _bottom;
        private XBorderPr _diagonal;
        private XBorderPr _vertical;
        private XBorderPr _horizontal;
        private XAttributeBase<bool> _diagonalUp;
        private XAttributeBase<bool> _diagonalDown;
        private XAttributeBase<bool> _outline;

        public XBorder()
            : base("border")
        {
            this.Add(_left = new XBorderPr("left"));
            this.Add(_right = new XBorderPr("right"));
            this.Add(_top = new XBorderPr("top"));
            this.Add(_bottom = new XBorderPr("bottom"));
            this.Add(_diagonal = new XBorderPr("diagonal"));
            this.Add(_vertical = new XBorderPr("vertical"));
            this.Add(_horizontal = new XBorderPr("horizontal"));
            _diagonalUp = new XAttributeBase<bool>(this, "diagonalUp");
            _diagonalDown = new XAttributeBase<bool>(this, "diagonalDown");
            _outline = new XAttributeBase<bool>(this, "outline");
        }

        public XBorderPr Left
        {
            get { return _left; }
        }

        public XBorderPr Right
        {
            get { return _right; }
        }

        public XBorderPr Top
        {
            get { return _top; }
        }

        public XBorderPr Bottom
        {
            get { return _bottom; }
        }

        public XBorderPr Diagonal
        {
            get { return _diagonal; }
        }

        public XBorderPr Vertical
        {
            get { return _vertical; }
        }

        public XBorderPr Horizontal
        {
            get { return _horizontal; }
        }

        public bool DiagonalUp
        {
            get { return _diagonalUp.Value; }
            set { _diagonalUp.Value = value; }
        }

        public bool DiagonalDown
        {
            get { return _diagonalDown.Value; }
            set { _diagonalDown.Value = value; }
        }

        public bool Outline
        {
            get { return _outline.Value; }
            set { _outline.Value = value; }
        }
    }
}
